package com.team2.outpatient_sys.dao;

import com.team2.outpatient_sys.pojo.CaseHistory;
import com.team2.outpatient_sys.pojo.Patient;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CaseHistoryDao {

    @Select("select * from case_history where patient_id = #{patientId}")
    public List<CaseHistory> searchCaseHistory(int patientId);

    @Insert("insert into case_history values(null,#{patientId},#{doctorId},#{deptId},#{prescriptionId},#{isStay},#{chiefComplaint},#{presentIllHistory},#{pastHistory},#{personalHistory})")
    public int add(CaseHistory caseHistory);
}
